﻿Imports System Imports System.Collections.Generic Imports System.Text 'Namespace DTO Public Class CHoaDon #Region "Khai bao thuộc tính"
    Private _maHD As String
    Private _maKH As String
    Private _maNV As String
    Private _nLap As Date
    Private _nThanhToan As Date
    Private _soLuong As Integer
    Private _tongTien As Double
    Private _tinhTrang As Integer
    Private _ghiChu As String
    Private _KhachHang_maKH As Integer
    Private _NhanVien_maNV As Integer

    Public Property maHD() As String
        Get
            Return _maHD
        End Get
        Set(ByVal value As String)
            _maHD = value
        End Set
    End Property

    Public Property maKH() As String
        Get
            Return _maKH
        End Get
        Set(ByVal value As String)
            _maKH = value
        End Set
    End Property

    Public Property maNV() As String
        Get
            Return _maNV
        End Get
        Set(ByVal value As String)
            _maNV = value
        End Set
    End Property

    Public Property nLap() As Date
        Get
            Return _nLap
        End Get
        Set(ByVal value As Date)
            _nLap = value
        End Set
    End Property

    Public Property nThanhToan() As Date
        Get
            Return _nThanhToan
        End Get
        Set(ByVal value As Date)
            _nThanhToan = value
        End Set
    End Property

    Public Property soLuong() As Integer
        Get
            Return _soLuong
        End Get
        Set(ByVal value As Integer)
            _soLuong = value
        End Set
    End Property

    Public Property tongTien() As Double
        Get
            Return _tongTien
        End Get
        Set(ByVal value As Double)
            _tongTien = value
        End Set
    End Property

    Public Property tinhTrang() As Integer
        Get
            Return _tinhTrang
        End Get
        Set(ByVal value As Integer)
            _tinhTrang = value
        End Set
    End Property

    Public Property ghiChu() As String
        Get
            Return _ghiChu
        End Get
        Set(ByVal value As String)
            _ghiChu = value
        End Set
    End Property

    Public Property KhachHang_maKH() As Integer
        Get
            Return _KhachHang_maKH
        End Get
        Set(ByVal value As Integer)
            _KhachHang_maKH = value
        End Set
    End Property

    Public Property NhanVien_maNV() As Integer
        Get
            Return _NhanVien_maNV
        End Get
        Set(ByVal value As Integer)
            _NhanVien_maNV = value
        End Set
    End Property

#End Region

#Region "Phương thức khởi tạo"
    Public Sub New()
        Me.maHD = ""
        Me.maKH = ""
        Me.maNV = ""
        Me.nLap = nLap.Date
        Me.nThanhToan = nThanhToan.Date
        Me.soLuong = 0
        Me.tongTien = 0
        Me.ghiChu = ""
        Me.KhachHang_maKH = 0
        Me.NhanVien_maNV = 0

    End Sub
    Public Sub New(ByVal hoaDon As CHoaDon)
        Me.maHD = hoaDon.maHD
        Me.maKH = hoaDon.maKH
        Me.maNV = hoaDon.maNV
        Me.nLap = hoaDon.nLap
        Me.nThanhToan = hoaDon.nThanhToan
        Me.soLuong = hoaDon.soLuong
        Me.tongTien = hoaDon.tongTien
        Me.ghiChu = hoaDon.ghiChu
        Me.KhachHang_maKH = hoaDon.KhachHang_maKH
        Me.NhanVien_maNV = hoaDon.NhanVien_maNV
    End Sub
    Public Sub New(ByVal ma_HD As String, ByVal ma_Kh As String, ByVal ma_NV As String, ByVal n_Lap As Date, ByVal n_ThanhToan As Date, ByVal so_Luong As Integer, ByVal tong_Tien As Double, ByVal ghi_Chu As String, ByVal KhachHang_ma_KH As Integer, ByVal NhanVien_ma_NV As Integer)
        Me.maHD = ma_HD
        Me.maKH = ma_Kh
        Me.maNV = ma_NV
        Me.nLap = n_Lap
        Me.nThanhToan = nThanhToan
        Me.soLuong = so_Luong
        Me.tongTien = tong_Tien
        Me.ghiChu = ghi_Chu
        Me.KhachHang_maKH = KhachHang_ma_KH
        Me.NhanVien_maNV = NhanVien_ma_NV
    End Sub

#End Region
End Class 'End Namespace 